From: Jasper St. Pierre Date: Wed, 2 Jan 2013 12:56:07 +0000 (-0500) Subject: messageTray: Clean up variable names X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4149 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=176a73f4e919afbd2fee544ff8812ae996d10208;p=gnome-shell.git messageTray: Clean up variable names Variable names like "sourceNotificationStackDoneShowing" are too long, and too undescriptive: this one points to a source, not a notification stack that has been done showing. --- diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 64fcecf33..635ee2677 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -2768,17 +2768,14 @@ const MessageTray = new Lang.Class({ this._summaryBoxPointerState = State.HIDDEN; this._summaryBoxPointer.bin.child = null; - let sourceNotificationStackDoneShowing = null; if (doneShowingNotificationStack) { - this._summaryBoxPointerItem.doneShowingNotificationStack(); - sourceNotificationStackDoneShowing = this._summaryBoxPointerItem.source; - } + let source = this._summaryBoxPointerItem.source; - this._summaryBoxPointerItem = null; + this._summaryBoxPointerItem.doneShowingNotificationStack(); + this._summaryBoxPointerItem = null; - if (sourceNotificationStackDoneShowing) { - if (sourceNotificationStackDoneShowing.isTransient && !this._reNotifyAfterHideNotification) - sourceNotificationStackDoneShowing.destroy(NotificationDestroyedReason.EXPIRED); + if (source.isTransient && !this._reNotifyAfterHideNotification) + source.destroy(NotificationDestroyedReason.EXPIRED); if (this._reNotifyAfterHideNotification) { this._onNotify(this._reNotifyAfterHideNotification.source, this._reNotifyAfterHideNotification); this._reNotifyAfterHideNotification = null;